CC=gcc
CFLAGS=-D_GNU_SOURCE -g -O2 -Wall
#CFLAGS=-D_GNU_SOURCE -g -Wall
LDFLAGS=-static
OBJS=httpd.o stat.o chart.jar.o
LIBS=-lz


all: testhttpd

testhttpd: ${OBJS}
	${CC} ${LDFLAGS} -o testhttpd ${OBJS} ${LIBS}

httpd.o: httpd.c common.h
	${CC} ${CFLAGS} -c httpd.c

stat.o: stat.c common.h
	${CC} ${CFLAGS} -c stat.c

chart.jar.o: chart.jar.c
	${CC} ${CFLAGS} -c chart.jar.c


clean: 
	rm -f *.o testhttpd
